/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgMemberFocus extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgMemberFocus";
	public static final String ALIAS_FID = "fid";
	public static final String ALIAS_FOCUS_MEMBER_ID = "focusMemberId";
	public static final String ALIAS_FOCUS_DATE = "focusDate";
	
	//date formats
	public static final String FORMAT_FOCUS_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * fid       db_column: fid 
     */	
	
	private java.lang.Integer fid;
    /**
     * memberId       db_column: memberId 
     */	
	
	private java.lang.Integer fromMemberId;
    public void setFromMemberId(java.lang.Integer fromMemberId) {
		this.fromMemberId = fromMemberId;
	}

	/**
     * focusMemberId       db_column: focusMemberId 
     */	
	
	private java.lang.Integer focusMemberId;
    /**
     * focusDate       db_column: focusDate 
     */	
	
	private java.util.Date focusDate;
	//columns END

	public SmgMemberFocus(){
	}

	public SmgMemberFocus(
		java.lang.Integer fid
	){
		this.fid = fid;
	}

	public void setFid(java.lang.Integer value) {
		this.fid = value;
	}
	
	public java.lang.Integer getFid() {
		return this.fid;
	}
	public java.lang.Integer getFromMemberId() {
		return this.fromMemberId;
	}
	public void setFocusMemberId(java.lang.Integer value) {
		this.focusMemberId = value;
	}
	
	public java.lang.Integer getFocusMemberId() {
		return this.focusMemberId;
	}
	public String getFocusDateString() {
		return DateConvertUtils.format(getFocusDate(), FORMAT_FOCUS_DATE);
	}
	public void setFocusDateString(String value) {
		setFocusDate(DateConvertUtils.parse(value, FORMAT_FOCUS_DATE,java.util.Date.class));
	}
	
	public void setFocusDate(java.util.Date value) {
		this.focusDate = value;
	}
	
	public java.util.Date getFocusDate() {
		return this.focusDate;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Fid",getFid())
			.append("FromMemberId",getFromMemberId())
			.append("FocusMemberId",getFocusMemberId())
			.append("FocusDate",getFocusDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getFid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgMemberFocus == false) return false;
		if(this == obj) return true;
		SmgMemberFocus other = (SmgMemberFocus)obj;
		return new EqualsBuilder()
			.append(getFid(),other.getFid())
			.isEquals();
	}
}

